import http from "@/api";

import { PORT1 } from "@/api/config/servicePort";

//获取生产国家列表表头
export const getCountryHead = (params ?: any) => {
	return http.post<{ dataarr : Record<string, DataOptionType[]>; defaults : Record<string, any> }>(
		`${PORT1}/goods-config/settings/manufacturer-county/field`,
		params,
		{ loading: false }
	);
};

//获取生产国家列表
export const getCountryList = (params ?: any) => {
	return http.post<{ dataarr : Record<string, DataOptionType[]>; defaults : Record<string, any> }>(
		`${PORT1}/goods-config/settings/manufacturer-county/list`,
		params, { loading: false }
	);
};

//新增编辑生产国家
export const addCountryItem = (params ?: any) => {
	return http.post<{ dataarr : Record<string, DataOptionType[]>; defaults : Record<string, any> }>(
		`${PORT1}/goods-config/settings/manufacturer-county/save`,
		params, { loading: false }
	);
};

//删除生产国家
export const deleteCountryItem = (params ?: any) => {
	return http.post<{ dataarr : Record<string, DataOptionType[]>; defaults : Record<string, any> }>(
		`${PORT1}/goods-config/settings/manufacturer-county/delete`,
		params, { loading: false }
	);
};